import request from '@/utils/request'

//根據課程id查詢所有的章節
export function getAllChapterVideo(courseId) {
    return request({
            url:`/eduservice/chapter/getChapterVideo/${courseId}`,
            method: 'get'
    })
}

//根据章节id查询信息
export function getChapter(chapterId) {
    return request({
            url:`/eduservice/chapter/getChapterInfo/${chapterId}`,
            method: 'get'
    })
}

//添加章节
export function addChapter(chapter) {
    return request({
            url:`/eduservice/chapter/addChapter`,
            method: 'post',
            data: chapter
    })
}

//修改章节
export function updateChapter(chapter) {
    return request({
            url:`/eduservice/chapter/updateChapter`,
            method: 'post',
            data: chapter
    })
}

//删除方法
export function deleteChapter(chapterId) {
    return request({
            url:`/eduservice/chapter/deleteChapter/${chapterId}`,
            method: 'delete'
    })
}

